!define APP_NAME "wails-app"
!define APP_VERSION "1.0.0"
!define APP_PUBLISHER "wails-app"
!define APP_EXE "wails-app.exe"
!define APP_ICON "frontend/icon.ico"

OutFile "${APP_NAME} Installer.exe"
InstallDir "$PROGRAMFILES\${APP_NAME}"
Icon "${APP_ICON}"
UninstallIcon "${APP_ICON}"

Section "Install"
  SetOutPath "$INSTDIR"
  File "${APP_EXE}"
  CreateShortcut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}"
  CreateShortcut "$SMPROGRAMS\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}"
SectionEnd

Section "Uninstall"
  Delete "$INSTDIR\${APP_EXE}"
  Delete "$DESKTOP\${APP_NAME}.lnk"
  Delete "$SMPROGRAMS\${APP_NAME}.lnk"
  RMDir "$INSTDIR"
SectionEnd